# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-graphviz
_pkgname=graphviz
pkgver=0.16
pkgrel=1
pkgdesc='Simple Python interface for Graphviz.'
arch=('any')
url='https://pypi.org/project/graphviz/#files'
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('7896901decf712657d4cb16fad58eab8492e1476e60a32b1a7fa37ede2e9c47ed31c00b7dedcaafdee291e2cfe6b2e2affa352282665782829fd3fb2f30bdf92')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

